Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports ClubStarterKit.Data
Imports ClubStarterKit.Web

Partial Class Poll_List
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim dt As PollQuestionsCollection = Poll.LoadQuestions()
        PollDataList.DataSource = dt
        PollDataList.DataBind()
    End Sub

    Protected Sub PollLink_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim selectedPollId As New Guid((DirectCast(sender, LinkButton)).CommandArgument)
        Response.Redirect(String.Format("~/Poll/View.aspx?pollId={0}", selectedPollId.ToString()), True)
    End Sub
End Class
